*CODE FOR POLITICAL BEHAVIOR SUBMISSION - RACE-BAITING AND POLITICAL TRUST 

*STUDY 1 - 4-PRIME+CONTROL US STUDY, JUNE 2016




/*OVERALL NOTES ABOUT THIS CODE FILE:  
- TWO DATASETS ARE USED FOR THIS ARTICLE: STUDY 1 (4-PRIME + CONTROL, 2016 study) and STUDY 2 (3-PRIME + CONTROL study)
- THE CODE CONCERNING STUDY 1 IS LISTED FIRST, FOLLOWED BY CODE CONCERNING STUDY 2
- SECTIONS OF CODE ARE LABELED FOR RELEVANCE TO TABLES AND FIGURES IN THE ARTICLE IN APPENDIX  

- TO USE, SET WORKING DIRECTORY AS FOLDER CONTAINING BOTH PROVIDED DATASETS (Study_1.dta & Study_2.dta). 

*/ 



use "Study_1.dta"

*FIGURES FOR MAIN TEXT - STUDY 1


*FIGURE 1, TOP:  STUDY 1 EFFECTS ON TRUST IN POL LEADERS AND INSTITUTIONS (DIFF FROM CONTROL GROUP) 


reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==2 
eststo s1_poltrustpols_lat
coefplot || , subtitle("Latino respondents") drop(_cons )  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(b, replace)

reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos if ethnicity==1 
eststo s1_poltrustpols_whi
coefplot  || , subtitle("White respondents") drop(_cons )  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(a, replace)

graph combine a b  , cols(1) xsize(4) ysize(2) scale(2) graphregion(color(white) ) 


reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==2 
eststo s1_poltrustinst_lat
coefplot || , subtitle("Latino respondents") drop(_cons )  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(d, replace)

reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos if ethnicity==1 
eststo s1_poltrustinst_whi
coefplot  || , subtitle("White respondents") drop(_cons party_repub party_dem party_other )  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(c, replace)

graph combine a b c d , cols(4) xsize(7) ysize(2) scale(1.6) graphregion(color(white) ) 


**********NOT DISPLAYED IN PAPER: 

*Checking for influence of party on results:
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos party_repub party_dem party_other if ethnicity==2 
eststo s1_poltrustpols_lat
coefplot || , subtitle("Latino respondents") drop(_cons party_repub party_dem party_other)  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(b, replace)

reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos party_repub party_dem party_other if ethnicity==1 
eststo s1_poltrustpols_whi
coefplot  || , subtitle("White respondents") drop(_cons  party_repub party_dem party_other)  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(a, replace)

graph combine a b  , cols(1) xsize(4) ysize(2) scale(2) graphregion(color(white) ) 


reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos party_repub party_dem party_other if ethnicity==2 
eststo s1_poltrustinst_lat
coefplot || , subtitle("Latino respondents") drop(_cons party_repub party_dem party_other)  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(d, replace)

reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos party_repub party_dem party_other if ethnicity==1 
eststo s1_poltrustinst_whi
coefplot  || , subtitle("White respondents") drop(_cons party_repub party_dem party_other party_repub party_dem party_other)  yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Lat."   2 "Pro-Lat." 3 "Anti-Mus." 4 "Pro-Mus.", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-.8 (.4) .8, glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(c, replace)

graph combine a b c d , cols(4) xsize(7) ysize(2) scale(1.6) graphregion(color(white) ) 

***********






*FIGURE 2, LEFT SIDE: STUDY 1 - TRUST IN SPEAKING POLITICIAN BY RESP. ETHNICITY & TREATMENT CONDITION
*levels by prime & ethnicity
reg poltrust_citedpoltrybest01   i.PRIME##ethnicity 
margins ethnicity, at (PRIME = (1 2 3 4))
marginsplot,  recastci(rspike) ylabel(, glcolor(gs12)) title("") xtitle(Message condition)  ytitle ("Will do his best to help (0-1)", margin(right) size(medsmall))  note("N = 2317", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xsize(2.5) ysize(2.5)  name (a, replace)

*anti/pro-minority condition gaps by prime target, ethnicity
reg poltrust_citedpoltrybest01 i.posprime##i.PRIME_byethnicity3 
margins, dydx(posprime) at (PRIME_byethnicity3 = (1 2 3 4))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-minority difference", margin(right)) xtitle("Latino primes                    Muslim primes") plotopts(barw(.4) color(gs10)) ylab(0 (.1) .4, glcolor(gs12)) xlab(1 "Whites" 2 "Latinos" 3 "Whites" 4 "Latinos")  xsize(2.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("Trust, Study 1", color(black) size(medsmall)) col(1) graphregion (color(white)) xsize(2.5) ysize(4.5) 

*manually change scaling in each graph to 1.2, aspect in gaps bargraph to 0.6 (orientation North)




*FIGURE 3, TOP : STUDY 1 - TRUST IN CITED POLITICIAN BY TREATMENT AND INGROUP IDENTIFICATION
*specific political trust, S1 - by ingroup identification
*as moderated by ingroup ID: Latino primes only, Study 1
reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus i.pol_party if PRIME<3 
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)   title ("") subtitle("Latino primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 1178", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(a, replace)

*as moderated by ingroup ID: Muslim primes only, Study 1
reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  i.pol_party if PRIME>2 
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)  title("")  subtitle("Muslim primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 1139", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title ("Trust in cited politician, by ingroup identification", margin(bottom) color(black) size(medium))  legendfrom(a) position(6) scale(1.3) xsize(6) ysize(3.5)


********NOT DISPLAYED IN PAPER
**Checking for diffs with party - NOT USED
reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME<3 & party_repub==1
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)   title ("") subtitle("Latino primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 313", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(a, replace)

reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME>2  & party_repub==1
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)  title("")  subtitle("Muslim primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 279", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title ("Trust in cited politician, by ingroup identification" "Republicans only", margin(bottom) color(black) size(medium))  legendfrom(a) position(6) scale(1.3) xsize(6) ysize(3.5)

reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME<3 & party_dem==1
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)   title ("") subtitle("Latino primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 458", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(a, replace)

reg poltrust_citedpoltrybest01    negprime##ethnicity##c.id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME>2  & party_dem==1
margins negprime, at (id_INGROUP = (0 (.2)1) ethnicity = (1 2))
marginsplot, recastci(rarea)  title("")  subtitle("Muslim primes only, Study 1") ytitle ("Will do his best to help (0-1)", margin(right) size(medlarge))  xtitle("Ingroup identification (3-item)" , margin(top) size(medlarge)) note("N = 478", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title ("Trust in cited politician, by ingroup identification" "Democrats only", margin(bottom) color(black) size(medium))  legendfrom(a) position(6) scale(1.3) xsize(6) ysize(3.5)



*TABLES FOR APPENDIX - STUDY 1 

*Background tables

tab ethnicity gender if insttrust_2index!=., chi2
tab ethnicity agegroup if  insttrust_2index!=., chi2
tab ethnicity educ if  insttrust_2index!=., chi2
tab ethnicity pol_party if insttrust_2index!=., chi2
ttest SDO_4index, by (ethnicity)
ttest authcr_4index, by (ethnicity)


*TABLE A3: Subjects by Ethnic group and message condition (Study 1)
tab ethnicity PRIME



* Fig A1, LEFT - message ratings

reg articlerating_negpos_ALL   i.PRIME_byethnicity2##negprime##ethnicity if poltrust_citedpoltrybest01!=. 
margins ethnicity, at (PRIME_byethnicity2 = (1 2 4 5) negprime = (0 1))
marginsplot, recast(scatter) recastci(rspike)  title ("Message ratings, Study 1", margin(bottom) color(black)) ylab(-8 (2) 8, glcolor(gs12))  ytitle ("Totally neg. to totally pos. (-10 to 10)", margin(right) size(medsmall))  xlab ( 1.5 "Latino prime" 4.5 "Muslim prime") note("N = 2316", size(medsmall)) plot1opts(mcolor(blue)  msize(medsmall) msymbol(circle)) plot3opts(mcolor(blue)  msize(medsmall) msymbol(square)) plot2opts(mcolor(maroon)  msize(medsmall) msymbol(diamond)) plot4opts(mcolor(maroon)  msize(medsmall) msymbol(triangle)) ci1opts(lcolor(blue) ) ci3opts(lcolor(blue) ) ci2opts(lcolor(maroon) ) ci4opts(lcolor(maroon) ) xtitle(Message target) graphregion(color(white) margin(medlarge)) yline(0, lpattern(tight_dot) lwidth(med_thick) lcolor(black)) xsize(2.5) ysize(2.5)



*TABLE A5
*Trust in pol leaders
**Latinos w/o controls
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==2 
eststo s1_ptpols_lat
**Latinos w/ controls
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==2 
eststo s1_ptpols_lat_contr
**Whites w/o controls
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==1
eststo s1_ptpols_whi
**Whites w controls
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==1 
eststo s1_ptpols_whi_contr
*Combined w/ controls
reg poltrust_4index_10 prime_latneg prime_latpos prime_musneg prime_muspos ethnicity inter_ethlatneg inter_ethlatpos inter_ethmusneg  inter_ethmuspos  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other
eststo s1_ptpols_all_controls

*Trust in pol institutions
**Latinos w/o controls
reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==2 
eststo s1_ptinst_lat
**Latinos w/ controls
reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==2 
eststo s1_ptinst_lat_contr
**Whites w/o controls
reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos  if ethnicity==1 
eststo s1_ptinst_whi
**Whites w/ controls
reg insttrust_2index_10 prime_latneg prime_latpos prime_musneg prime_muspos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==1 
eststo s1_ptinst_whi_contr
*Combined w/ controls
reg insttrust_2index_10  prime_latneg prime_latpos prime_musneg prime_muspos ethnicity inter_ethlatneg inter_ethlatpos inter_ethmuspos inter_ethmusneg gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other
eststo s1_ptinst_all_controls

esttab s1_ptpols_lat s1_ptpols_lat_contr s1_ptpols_whi  s1_ptpols_whi_contr s1_ptpols_all_controls s1_ptinst_lat s1_ptinst_lat_contr s1_ptinst_whi  s1_ptinst_whi_contr s1_ptinst_all_controls, nogaps cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 


est drop *



*TABLE A7
*testing anti-Lat effect on inst trust among Latinos for interaction with identification
*Note: includes only Latinos in anti-Latino & control conditions
est drop *
 
reg insttrust_2index_10 prime_latneg   if ethnicity==2 & (PRIME==0 | PRIME==1)
eststo
reg insttrust_2index_10 prime_latneg  id_INGROUP_groupstd if ethnicity==2 & (PRIME==0 | PRIME==1)
eststo
reg insttrust_2index_10 prime_latneg  id_INGROUP_groupstd inter_latneg_idstd  if ethnicity==2 & (PRIME==0 | PRIME==1)
eststo
reg insttrust_2index_10 prime_latneg  id_INGROUP_groupstd inter_latneg_idstd gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==2 & (PRIME==0 | PRIME==1)
eststo

esttab , nogaps cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 



*TABLE A9: 
*SPECIFIC POLITICAL TRUST, S1
est drop *
quietly eststo ptcited_lat_lat: reg poltrust_citedpoltrybest01 negprime  if ethnicity==2 & (PRIME ==1 | PRIME==2) 
quietly eststo ptcited_whi_lat: reg poltrust_citedpoltrybest01 negprime  if ethnicity==1 & (PRIME ==1 | PRIME==2) 
quietly eststo ptcited_all_latnc: reg poltrust_citedpoltrybest01 negprime ethnicity inter_eth_negprime  if (PRIME ==1 | PRIME==2) 
quietly eststo ptcited_all_latwc: reg poltrust_citedpoltrybest01 negprime ethnicity inter_eth_negprime gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if (PRIME ==1 | PRIME==2) 

quietly eststo ptcited_lat_mus: reg poltrust_citedpoltrybest01 negprime  if ethnicity==2 & (PRIME==3|PRIME==4) 
quietly eststo ptcited_whi_mus: reg poltrust_citedpoltrybest01 negprime  if ethnicity==1 & (PRIME==3|PRIME==4) 
quietly eststo ptcited_all_musnc: reg poltrust_citedpoltrybest01 negprime ethnicity inter_eth_negprime  if (PRIME==3|PRIME==4) 
quietly eststo ptcited_all_muswc: reg poltrust_citedpoltrybest01 negprime ethnicity inter_eth_negprime gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if (PRIME==3|PRIME==4) 

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) order(negprime ethnicity inter_eth_negprime)

*test for moderation by ingroup identification, citedpol trust as DV

est drop *


*FIGURE A5, Left side (study 1): Trust in, and willingness to vote for (Study 2 only), the politician cited in the treatment article, by respondent ethnicity and message condition - controlling for party, gender, age group and education

*(parallel to figure 2, with control for background vars including party)

*levels by prime & ethnicity
reg poltrust_citedpoltrybest01   i.PRIME##ethnicity gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus i.pol_party
margins ethnicity, at (PRIME = (1 2 3 4))
marginsplot,  recastci(rspike) ylabel(, glcolor(gs12)) title("") xtitle(Message condition)  ytitle ("Will do his best to help (0-1)", margin(right) size(medsmall))  note("N = 2317", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xsize(2.5) ysize(2.5)  name (a, replace)

*anti/pro-minority condition gaps by prime target, ethnicity
reg poltrust_citedpoltrybest01 i.posprime##i.PRIME_byethnicity3 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus i.pol_party
margins, dydx(posprime) at (PRIME_byethnicity3 = (1 2 3 4))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-minority difference", margin(right)) xtitle("Latino primes                    Muslim primes") plotopts(barw(.4) color(gs10)) ylab(0 (.1) .4, glcolor(gs12)) xlab(1 "Whites" 2 "Latinos" 3 "Whites" 4 "Latinos")  xsize(2.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("Trust, Study 1", color(black) size(medsmall)) subtitle("Controlling for background variables", color(black) size(small)) col(1) graphregion (color(white)) xsize(2.5) ysize(4.5) 

*manually change scaling in each graph to 1.2, aspect in gaps bargraph to 0.6 (orientation North)



*TABLE A12: Effect of seeing a negative message on trust in the cited politician (as compared to a positive message), testing for moderation by ingroup identification level, Study 1
*testing for moderation of effect of negprime (ref: posprime) within each prime-target and respondent ethnic group
quietly eststo ptcited_whi_latnegid: reg poltrust_citedpoltrybest01 negprime id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if latinoprime ==1 & ethnicity==1
quietly eststo ptcited_whi_latnegidinter: reg poltrust_citedpoltrybest01 negprime id_INGROUP  inter_negprime_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other       if latinoprime ==1 & ethnicity==1

quietly eststo ptcited_whi_musnegid: reg poltrust_citedpoltrybest01 negprime id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if muslimprime ==1 & ethnicity==1 
quietly eststo ptcited_whi_musnegidinterwc: reg poltrust_citedpoltrybest01 negprime id_INGROUP inter_negprime_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other       if muslimprime ==1 & ethnicity==1 

quietly eststo ptcited_lat_latnegid: reg poltrust_citedpoltrybest01 negprime id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if latinoprime ==1 & ethnicity==2
quietly eststo ptcited_lat_latnegidinterwc: reg poltrust_citedpoltrybest01 negprime id_INGROUP inter_negprime_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other       if latinoprime ==1 & ethnicity==2 

quietly eststo ptcited_lat_musnegid: reg poltrust_citedpoltrybest01 negprime id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if muslimprime ==1 & ethnicity==2 
quietly eststo ptcited_lat_musnegidinterwc: reg poltrust_citedpoltrybest01 negprime id_INGROUP inter_negprime_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other       if muslimprime ==1 & ethnicity==2

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) order( negprime id_INGROUP  inter_negprime_ID)

*TABLE A13: Ethnic differences in trust in the cited politician within each condition, testing for moderation by ingroup identification level, Study 1. 
*testing for differences in ID-moderation between ethnic groups
est drop *

quietly eststo ptcited_whi_latnegid: reg poltrust_citedpoltrybest01 white id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==1 
quietly eststo ptcited_whi_latnegidinterwc: reg poltrust_citedpoltrybest01 white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==1 

quietly eststo ptcited_whi_latposid: reg poltrust_citedpoltrybest01 white id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==2 
quietly eststo ptcited_whi_latposidinterwc: reg poltrust_citedpoltrybest01 white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==2 

quietly eststo ptcited_whi_musnegid: reg poltrust_citedpoltrybest01 white id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==3 
quietly eststo ptcited_whi_musnegidinterwc: reg poltrust_citedpoltrybest01 white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==3 

quietly eststo ptcited_whi_musposid: reg poltrust_citedpoltrybest01 white id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==4 
quietly eststo ptcited_whi_musposidinterwc: reg poltrust_citedpoltrybest01 white id_INGROUP inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==4 

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) order( white id_INGROUP inter_white_ID01)



*testing within each prime & ethnic group, with extra model including SDO & authoritarianism
est drop *

*TABLE A18: Effects of ingroup identification on trust in the cited politician, Latino-targeting conditions, Study 1 - by message content, controlling for background factors, party affiliation and ideological factors.
*Latino-targeting conditions
quietly eststo pt_whi_LNid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==1 & ethnicity==1
quietly eststo pt_whi_LNidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==1 & ethnicity==1
quietly eststo pt_whi_LNidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==1 & ethnicity==1

quietly eststo pt_whi_LPid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==2 & ethnicity==1
quietly eststo pt_whi_LPidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==2 & ethnicity==1
quietly eststo pt_whi_LPidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==2 & ethnicity==1

quietly eststo pt_lat_LNid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==1 & ethnicity==2
quietly eststo pt_lat_LNidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==1 & ethnicity==2
quietly eststo pt_lat_LNidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==1 & ethnicity==2

quietly eststo pt_lat_LPid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==2 & ethnicity==2
quietly eststo pt_lat_LPidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==2 & ethnicity==2
quietly eststo pt_lat_LPidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==2 & ethnicity==2

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 


est drop *

*TABLE A19: Effects of ingroup identification on trust in the cited politician, Muslim-targeting conditions, Study 1 - by message content, controlling for background factors, party affiliation and ideological factors.
*Muslim-targeting conditions
quietly eststo pt_whi_MNid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==3 & ethnicity==1
quietly eststo pt_whi_MNidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==3 & ethnicity==1
quietly eststo pt_whi_MNidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==3 & ethnicity==1

quietly eststo pt_whi_MPid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==4 & ethnicity==1
quietly eststo pt_whi_MPidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==4 & ethnicity==1
quietly eststo pt_whi_MPidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==4 & ethnicity==1

quietly eststo pt_lat_MNid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==3 & ethnicity==2
quietly eststo pt_lat_MNidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==3 & ethnicity==2
quietly eststo pt_lat_MNidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==3 & ethnicity==2

quietly eststo pt_lat_MPid: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus  if PRIME ==4 & ethnicity==2
quietly eststo pt_lat_MPidparty: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if PRIME ==4 & ethnicity==2
quietly eststo pt_lat_MPidsdoauth: reg poltrust_citedpoltrybest01 id_INGROUP gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index authcr_4index if PRIME ==4 & ethnicity==2

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 












***********************************************************
***********************************************************
*STUDY 2 - 3-PRIME+CONTROL US STUDY, March 2017

use "Study_2.dta"

/*NOTE: The code in the following lines was used to randomize mixed-condition respondents into two groups to allow simpler analysis of those in the mixed-condition treatment group; the submitted data file already includes the generated variables; a new randomization may produce slightly different results
gen random = runiform()
sort random
sort prime_mixed
gen mixed_randomTWO = .
replace mixed_randomTWO = 0 if prime_mixed==1
replace mixed_randomTWO = 1 in 644/731

gen PRIMEnegposorder = .
replace PRIMEnegposorder = 1 if prime_neg==1
replace PRIMEnegposorder = 2 if prime_pos==1
replace PRIMEnegposorder = 3 if mixed_randomTWO==0 
replace PRIMEnegposorder = 4 if mixed_randomTWO==1

gen PRIMEpos_all = .
replace PRIMEpos_all = 2 if prime_pos==1
replace PRIMEpos_all = 4 if prime_mixed==1

gen PRIMEneg_all = .
replace PRIMEneg_all = 1 if prime_neg==1
replace PRIMEneg_all = 3 if prime_mixed==1

gen posprime_listuse = 0
replace posprime_listuse = 1 if PRIMEnegposorder==2 | PRIMEnegposorder==4

gen negprime_listuse = 0
replace negprime_listuse= 1 if PRIME==1 | mixed_randomTWO==0
gen inter_neglistuse_eth = negprime_listuse*ethnicity

gen PRIME_bynegpos_randmix = .
replace PRIME_bynegpos_randmix = 1 if negprime_listuse==1
replace PRIME_bynegpos_randmix = 2 if posprime_listuse==1

*/


**************


*FIGURE 1, bottom row (Study 2)
*general political trust

reg poltrust_4index_10 prime_neg prime_mixed prime_pos   if ethnicity==1 
eststo s2_poltrustpols_lat
coefplot || , drop(_cons   ) subtitle("Latino respondents") yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Latino" 2 "Both messages" 3 "Pro-Latino", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-1.4 (.7) 1.4, angle(0) glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(a, replace)

reg poltrust_4index_10 prime_neg prime_mixed prime_pos  if ethnicity==0
eststo s2_poltrustpols_whi
coefplot  || , drop(_cons   ) subtitle("White respondents") yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Latino" 2 "Both messages" 3 "Pro-Latino", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-1.4 (.7) 1.4, angle(0) glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(b, replace)

graph combine b a , cols(2)  xsize(4) ysize(1.5) scale(2) graphregion(color(white)) 


reg insttrust_2index_10 prime_neg prime_mixed prime_pos   if ethnicity==1 
eststo s2_poltrustinst_lat
coefplot || , drop(_cons   ) subtitle("Latino respondents") yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick)) mcolor(maroon) msymbol(square) ciopts(lcolor(maroon) lwidth(medthick))  xlabel(1 "Anti-Latino" 2 "Both messages" 3 "Pro-Latino", alt)  graphregion(color(white))  vertical col(3)   mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-1.4 (.7) 1.4, angle(0) glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(c, replace)

reg insttrust_2index_10 prime_neg prime_mixed prime_pos  if ethnicity==0
eststo s2_poltrustinst_whi
coefplot  || , drop(_cons   ) subtitle("White respondents") yline(0, lpattern (tight_dot) lcolor(black) lwidth(medthick))  mcolor(blue) msymbol(circle) ciopts(lcolor(blue) lwidth(medthick)) xlabel(1 "Anti-Latino" 2 "Both messages" 3 "Pro-Latino", alt)  graphregion(color(white))  vertical col(3)    mlabel format(%2.1f) mlabposition(12) mlabgap(*2) mlabcolor(black) ylabel(-1.4 (.7) 1.4, angle(0) glcolor(gs12) format(%2.1f)) graphregion(color(white) margin(small)) title("") name(d, replace)

graph combine b a d c , cols(4)  xsize(7) ysize(2) scale(1.6) graphregion(color(white)) 






*specific pol trust - note that this figure created using the groupings where mixed-message respondents are randomized to be analyzed using either their responses about the pos or neg. politician (see code for creating groupings just above)

/*
gen citedpol_unified = citedpol_pos_help01 if PRIME==3 | mixed_randomTWO==1
replace citedpol_unified = citedpol_neg_help01 if PRIME==1 | mixed_randomTWO==0

gen citedpolvote_unified = cited_pos_wouldvote if PRIME==3 | mixed_randomTWO==1
replace citedpolvote_unified = cited_neg_wouldvote if PRIME==1 | mixed_randomTWO==0

gen PRIME_byethnicitysingle3 = PRIME_byethnicitysingle
recode PRIME_byethnicitysingle3 (4=3) (5=4)
*/ 



*FIGURE 2, right side

*specific pol trust & vote likelihood, by ethnicity
*with single- & mixed-condition respondents combined (mixed are randomized to be included in either neg or pos group, with responses referring to that pol.)
reg citedpol_unified i.PRIME_bynegpos_randmix##ethnicity 
margins ethnicity, at (PRIME_bynegpos_randmix = (1 2))
marginsplot, recastci(rspike)   ylabel(.2(.1) .8, glcolor(gs12)) title("") subtitle("Trust, Study 2")  ytitle ("Will do his best to help (0-1)", margin(right) size(medsmall)) xtitle ("") xlab(1 "Anti-Lat." 2 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(1.5) ysize(2.5) name (a, replace)

reg citedpolvote_unified i.PRIME_bynegpos_randmix##ethnicity
margins ethnicity, at (PRIME_bynegpos_randmix = (1 2))
marginsplot, recastci(rspike)   ylabel(10(10) 80, glcolor(gs12)) title("") subtitle("Would vote for, Study 2")  ytitle ("Likelihood that you would vote for (%)", margin(right) size(medsmall)) xtitle ("") xlab(1 "Anti-Lat." 2 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(1.5) ysize(2.5) name (b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title ("", margin(bottom) color(black) size(medium))  legendfrom(a) position(6) scale(1.3) xsize(4) ysize(2)

reg citedpol_unified i.posprime_listuse##ethnicity 
margins, dydx(posprime_listuse) at (ethnicity = (0 1))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("") plotopts(barw(.4) color(gs10)) ylab(0 (.1) .4, glcolor(gs12)) xlab(0 "Whites" 1 "Latinos")  xsize(1.5) ysize(2)  graphregion(color(white) ) name(a, replace)

reg citedpolvote_unified i.posprime_listuse##ethnicity 
margins, dydx(posprime_listuse) at (ethnicity = (0 1))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("") plotopts(barw(.4) color(gs10)) ylab(0 (10) 60, glcolor(gs12)) xlab(0 "Whites" 1 "Latinos")  xsize(1.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("") col(2) graphregion (color(white)) xsize(4) ysize(1.5) scale (1.3)



*FIGURE 3, bottom row: TESTING FOR MODERATION BY INGROUP IDENTIFICATION

reg citedpol_unified  negprime_listuse##ethnicity##c.id_INGROUP gender educ_collegeplus i.agegroup party_dem party_indep party_other   
margins negprime_listuse, at (id_INGROUP = (0 (.2)1) ethnicity = (0 1))
marginsplot, recastci(rarea)   title ("") subtitle("Trust, Study 2") ytitle ("Will do his best to help (0-1)", margin(right) size(medium))  ylab(0(.1).8, glcolor(gs12)) xtitle("Ingroup identification (4-item)" ,  size(medium)) note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge)) legend(order(5 "Whites, pro-Lat. mssg." 6 "Whites, anti-Lat. mssg." 7 "Latinos, pro-Lat. mssg." 8 "Latinos, anti-Lat. mssg.")) name(a, replace)

reg citedpolvote_unified  negprime_listuse##ethnicity##c.id_INGROUP gender educ_collegeplus i.agegroup party_dem party_indep party_other   
margins negprime_listuse, at (id_INGROUP = (0 (.2)1) ethnicity = (0 1))
marginsplot, recastci(rarea)   title ("") subtitle("Would vote for, Study 2") ytitle ("Likelihood that you would vote for (%)", margin(right) size(medium)) ylab(0(10)80, glcolor(gs12))  xtitle("Ingroup identification (4-item)" ,  size(medium)) note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(circle)) plot2opts(mcolor(blue) msize(small) lpattern(tight_dot) lcolor(blue) msymbol(square)) plot3opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(diamond)) plot4opts(mcolor(maroon) msize(small) lpattern(shortdash) lcolor(maroon) msymbol(triangle))  ci1opts(lpattern(dot) acolor(blue) fintensity(inten10 )) ci2opts(lpattern(dot) acolor(blue) fintensity(inten10 ))  ci3opts(lpattern(dot)  acolor(maroon) fintensity(inten10 )) ci4opts( lpattern(dot)  acolor(maroon) fintensity(inten10 )) graphregion(color(white) margin(medlarge))  name(b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white))  legendfrom(a) position(6) scale(1.3) xsize(6) ysize(3.5)







*TABLES FOR APPENDIX - STUDY 2 - 2017, 3-prime
* Table A1, Study 2 - background comparison
tab ethnicity gender if insttrust_2index!=., chi2
tab ethnicity agegroup if  insttrust_2index!=., chi2
tab ethnicity educ if  insttrust_2index!=., chi2
tab ethnicity pol_party if insttrust_2index!=., chi2
ttest SDO_4index, by(ethnicity)
ttest auth_2index, by (ethnicity)


*Table A3, Study 2
tab PRIME ethnicity



* message ratings - Fig. A1, right side

reg article_messagerating   i.PRIME_byethnicity##ethnicity  
margins ethnicity, at (PRIME_byethnicity = (1 2 4 5 7 8) )
marginsplot, recast(scatter)  recastci(rspike) title ("Message ratings, Study 2", margin(bottom))  ytitle ("Totally neg. to totally pos. (-10 to 10)", margin(right) size(medsmall))  xlab ( 1.5 "Negative" 4.5 "Mixed" 7.5 "Positive") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(circle)  msize(medium))  plot2opts(mcolor(maroon)  msize(medium) msymbol(triangle)) ci1opts(lcolor(blue) )   ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(2.5) ysize(3)  aspect(1.4)


*Table A4 - attribution of cited political to a political party 
tab citedpol_neg_party  ethnicity
tab citedpol_pos_party ethnicity


*Figure A2 - Probability of attributing the presented message to Republican, to Democratic politician by respondent ethnicity, Study 2. 
**NOTE: Must install command combomarginsplot to make the following figure.


logit   citedposparty_repub   i.PRIMEnegposorder##i.ethnicity if (PRIME==3 |mixed_randomTWO==1)
margins ethnicity, at (PRIMEnegposorder = (2 4 ) ) saving (file1, replace)
logit   citednegparty_repub    i.PRIMEnegposorder##i.ethnicity if (PRIME==1 |mixed_randomTWO==0)
margins ethnicity, at (PRIMEnegposorder = (1 3 ) ) saving (file2, replace)
combomarginsplot12 file1 file2, recastci(rspike) ylabel(0(.1) 1, glcolor(gs12)) title("Attrib. to Republican politician")   ytitle ("Pr. (Attributing to Republican)", margin(right) size(medsmall)) xtitle ("One mssg.           Mixed") xlab(1 "Anti-Lat." 2 "Pro-Lat." 3 "Anti-Lat." 4 "Pro-Lat.") note("N=548", color(black))  plot1opts(mcolor(forest_green) msymbol(O) lcolor(forest_green) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot))  ci1opts(lcolor(forest_green) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(2.5) ysize(2.5) name (a, replace)

logit   citedposparty_dem   i.PRIMEnegposorder##i.ethnicity if (PRIME==3 |mixed_randomTWO==1)
margins ethnicity, at (PRIMEnegposorder = (2 4 ) ) saving (file1, replace)
logit   citednegparty_dem    i.PRIMEnegposorder##i.ethnicity if (PRIME==1 |mixed_randomTWO==0)
margins ethnicity, at (PRIMEnegposorder = (1 3 ) ) saving (file2, replace)
combomarginsplot12 file1 file2, recastci(rspike) ylabel(0(.1) 1, glcolor(gs12)) title("Attrib. to Democratic politician")   ytitle ("Pr. (Attributing to Republican)", margin(right) size(medsmall)) xtitle ("One mssg.           Mixed") xlab(1 "Anti-Lat." 2 "Pro-Lat." 3 "Anti-Lat." 4 "Pro-Lat.") note("N=548", color(black))  plot1opts(mcolor(forest_green) msymbol(O) lcolor(forest_green) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot))  ci1opts(lcolor(forest_green) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(2.5) ysize(2.5) name (b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title("Respondents' likelihood of attributing messages to each party", size(medsmall) color(black)) legendfrom(a) position(6) scale(1.3) xsize(6) ysize(3.5)



*Figure A4: Uncontrolled vs. controlled, Levels of trust in politicians (upper) and political institutions (lower), Study 2 
reg poltrust_4index_10 i.PRIME##ethnicity  
margins ethnicity, at (PRIME = ( 0 1 2 3 ) ) 
marginsplot , recastci(rspike) ylabel(, glcolor(gs12)) title("") subtitle("", color(black) size(medsmall)) xtitle(Message condition) ytitle("")  plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash) ) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xlabel(0 "Control" 1 "Anti-Lat."   2 "Both" 3 "Pro-Lat." , alt) xsize(2.5) ysize(2.5)   yline (3.125, lpattern (tight_dot) lcolor (blue) lwidth(medthick))   yline (3.423, lpattern (tight_dot) lcolor (maroon) lwidth(medthick)) ylabel(2.5 (.25) 4.25, glcolor(gs12) format(%3.2f) angle(45)) name (a, replace)

reg insttrust_2index_10 i.PRIME##ethnicity  
margins ethnicity, at (PRIME = ( 0 1 2 3 ) ) 
marginsplot , recastci(rspike) ylabel(, glcolor(gs12)) title("") subtitle("", color(black) size(medsmall)) xtitle(Message condition)  ytitle("")   plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash) ) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xlabel(0 "Control" 1 "Anti-Lat."   2 "Both" 3 "Pro-Lat." , alt) xsize(2.5) ysize(2.5)   yline (3.120, lpattern (tight_dot) lcolor (blue) lwidth(medthick))   yline (3.754, lpattern (tight_dot) lcolor (maroon) lwidth(medthick)) ylabel(2.5 (.25) 4.25, glcolor(gs12) format(%3.2f) angle(45))  name (c, replace)

grc1leg a c , cols(2) xsize(5) ysize(3) scale(1.5) graphregion(color(white) )  legendfrom(a) position(6) 

reg poltrust_4index_10 i.PRIME##ethnicity  gender educ_collegeplus i.agegroup party_dem party_indep party_other 
margins ethnicity, at (PRIME = ( 0 1 2 3) ) 
marginsplot , recastci(rspike) ylabel(, glcolor(gs12)) title("") xtitle(Message condition)  ytitle("")   plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash) ) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xlabel(0 "Control"1 "Anti-Lat."   2 "Both" 3 "Pro-Lat." , alt) xsize(2.5) ysize(2.5)   yline (3.097, lpattern (tight_dot) lcolor (blue) lwidth(medthick))   yline (3.572	, lpattern (tight_dot) lcolor (maroon) lwidth(medthick)) ylabel(2.5 (.25) 4.25, glcolor(gs12) format(%3.2f) angle(45))   name (b, replace)

reg insttrust_2index_10 i.PRIME##ethnicity   gender educ_collegeplus i.agegroup party_dem party_indep party_other 
margins ethnicity, at (PRIME = ( 0 1 2 3 ) ) 
marginsplot , recastci(rspike) ylabel(, glcolor(gs12)) title("") xtitle(Message condition)   ytitle("")   plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash) ) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) ) xlabel(0 "Control" 1 "Anti-Lat."   2 "Both" 3 "Pro-Lat." , alt) xsize(2.5) ysize(2.5)   yline (3.11, lpattern (tight_dot) lcolor (blue) lwidth(medthick))   yline (3.88, lpattern (tight_dot) lcolor (maroon) lwidth(medthick)) ylabel(2.5 (.25) 4.25, glcolor(gs12) format(%3.2f) angle(45))   name (d, replace)

grc1leg  a b c d   , cols(2) xsize(6) ysize(9)  scale (1.2) graphregion(color(white) ) legendfrom(a) position (6)




*Table A6. Effects of Latino- and Muslim-related messages on trust in political leaders (4-item) and institutions (2-item) among Latino and White respondents, Study 2.

est drop *

reg poltrust_4index_10 prime_neg prime_mixed prime_pos  if ethnicity==1 
eststo s2_ptpols_lat

reg poltrust_4index_10 prime_neg prime_mixed prime_pos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==1 
eststo s2_ptpols_lat_cont


reg poltrust_4index_10 prime_neg prime_mixed prime_pos if ethnicity==0
eststo s2_ptpols_whi

reg poltrust_4index_10 prime_neg prime_mixed prime_pos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==0
eststo s2_ptpols_whi_cont

reg poltrust_4index_10 prime_neg prime_mixed prime_pos ethnicity inter_ethneg inter_ethmixed inter_ethpos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  
eststo s2_ptpols_all_cont


reg insttrust_2index_10 prime_neg prime_mixed prime_pos   if ethnicity==1 
eststo s2_ptinst_lat

reg insttrust_2index_10 prime_neg prime_mixed prime_pos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==1 
eststo s2_ptinst_lat_cont

reg insttrust_2index_10 prime_neg prime_mixed prime_pos   if ethnicity==0
eststo s2_ptinst_whi

reg insttrust_2index_10 prime_neg prime_mixed prime_pos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==0
eststo s2_ptinst_whi_cont


reg insttrust_2index_10 prime_neg prime_mixed prime_pos ethnicity inter_ethneg inter_ethmixed inter_ethpos gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  
eststo s2_ptinst_all_cont


esttab s2_ptpols_lat s2_ptpols_lat_cont s2_ptpols_whi s2_ptpols_whi_cont s2_ptpols_all_cont s2_ptinst_lat s2_ptinst_lat_cont s2_ptinst_whi s2_ptinst_whi_cont s2_ptinst_all_cont, nogaps cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 




*Table A8: Testing for moderation of anti-Latino message effect on trust in political institutions with ingroup identification (among Latino respondents only), Study 2. 


est drop *
 
reg insttrust_2index_10 prime_neg prime_mixed  if ethnicity==1 & PRIME!=3
eststo
reg insttrust_2index_10 prime_neg prime_mixed id_INGROUP_groupstd if ethnicity==1 & PRIME!=3
eststo
reg insttrust_2index_10 prime_neg prime_mixed id_INGROUP_groupstd inter_neg_IDgroupstd inter_both_IDgroupstd if ethnicity==1 & PRIME!=3
eststo
reg insttrust_2index_10 prime_neg prime_mixed id_INGROUP_groupstd inter_neg_IDgroupstd inter_both_IDgroupstd gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other if ethnicity==1 & PRIME!=3
eststo

esttab , nogaps cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) 







*Table A10: Effects of negative prime messages on trust in the cited politician, as compared to positive messages, by respondent group and testing for differences in effects, Study 2. 


*with randomized mixed group as shown in Figure

est drop *

reg citedpol_unified negprime_listuse    prime_mixed if ethnicity==1
eststo
reg citedpol_unified negprime_listuse   prime_mixed if ethnicity==0
eststo
reg citedpol_unified negprime_listuse ethnicity  inter_neglistuse_eth prime_mixed 
eststo
reg citedpol_unified negprime_listuse ethnicity  inter_neglistuse_eth prime_mixed gender educ_collegeplus i.agegroup party_dem party_indep party_other
eststo
esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) order(negprime_listuse  prime_mixed ethnicity  inter_neglistuse_eth ) drop (1bn.agegroup)


*Table A11:Effects of negative prime messages on willingness to vote for the cited politician, as compared to positive messages, by respondent group and testing for differences in effects, Study 2.

est drop *

reg citedpolvote_unified negprime_listuse    prime_mixed if ethnicity==1
eststo
reg citedpolvote_unified negprime_listuse   prime_mixed if ethnicity==0
eststo
reg citedpolvote_unified negprime_listuse ethnicity  inter_neglistuse_eth prime_mixed 
eststo
reg citedpolvote_unified negprime_listuse ethnicity  inter_neglistuse_eth prime_mixed gender educ_collegeplus i.agegroup party_dem party_indep party_other
eststo
esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2) order(negprime_listuse  prime_mixed ethnicity  inter_neglistuse_eth ) drop (1bn.agegroup)





*FIGURE A5, right side: specific pol trust & vote likelihood, by ethnicity  - WITH CONTROLS, STUDY 2
*with single- & mixed-condition respondents combined (mixed are randomized to be included in either neg or pos group, with responses referring to that pol.)
reg citedpol_unified i.PRIME_bynegpos_randmix##ethnicity gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other 
margins ethnicity, at (PRIME_bynegpos_randmix = (1 2))
marginsplot, recastci(rspike)   ylabel(.2(.1) .8, glcolor(gs12)) title("") subtitle("Trust, Study 2")  ytitle ("Will do his best to help (0-1)", margin(right) size(medsmall)) xtitle ("") xlab(1 "Anti-Lat." 2 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(1.5) ysize(2.5) name (a, replace)

reg citedpolvote_unified i.PRIME_bynegpos_randmix##ethnicity gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other 
margins ethnicity, at (PRIME_bynegpos_randmix = (1 2))
marginsplot, recastci(rspike)   ylabel(10(10) 80, glcolor(gs12)) title("") subtitle("Would vote for, Study 2")  ytitle ("Likelihood that you would vote for (%)", margin(right) size(medsmall)) xtitle ("") xlab(1 "Anti-Lat." 2 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(1.5) ysize(2.5) name (b, replace)

grc1leg a b , cols(2) colfirst  graphregion(color(white)) title ("", margin(bottom) color(black) size(medium))  legendfrom(a) position(6) scale(1.3) xsize(4) ysize(2)

reg citedpol_unified i.posprime_listuse##ethnicity gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other 
margins, dydx(posprime_listuse) at (ethnicity = (0 1))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("") plotopts(barw(.4) color(gs10)) ylab(0 (.1) .4, glcolor(gs12)) xlab(0 "Whites" 1 "Latinos")  xsize(1.5) ysize(2)  graphregion(color(white) ) name(a, replace)

reg citedpolvote_unified i.posprime_listuse##ethnicity gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other 
margins, dydx(posprime_listuse) at (ethnicity = (0 1))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("") plotopts(barw(.4) color(gs10)) ylab(0 (10) 60, glcolor(gs12)) xlab(0 "Whites" 1 "Latinos")  xsize(1.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("") col(2) graphregion (color(white)) xsize(4) ysize(1.5) scale (1.3)





*Figure A6 Trust in, and willingness to vote for, the politician cited in the treatment article, by respondent ethnicity and message condition - estimated separately for single- and mixed-message conditions, Study 2.

est drop * 

*Trust in cited pol (figure A6, left side)
reg citedpol_pos_help01    i.PRIMEnegposorder##i.ethnicity  if (PRIME==3 |mixed_randomTWO==1)
eststo spectrust_posS2
margins ethnicity, at (PRIMEnegposorder = (2 4 ) ) saving (file1, replace)
reg citedpol_neg_help01    i.PRIMEnegposorder##i.ethnicity  if (PRIME==1 |mixed_randomTWO==0)
eststo spectrust_negS2
margins ethnicity, at (PRIMEnegposorder = (1 3 ) ) saving (file2, replace)
combomarginsplot file1 file2,  recastci(rspike) ylabel(.2(.1) .8, glcolor(gs12)) title("")   ytitle ("Will do his best to help (0-1)", margin(right) size(medsmall)) xtitle ("Single mssg.                    Both mssgs.")   xlab(1 "Anti-Lat." 2 "Pro-Lat." 3 "Anti-Lat." 4 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge))   xsize(2.5) ysize(2.5) name (a, replace)

reg citedpol_unified i.posprime_listuse##i.PRIME_byethnicitysingle3
margins, dydx(posprime_listuse) at (PRIME_byethnicitysingle3 = (1 2 3 4))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("Single mssg.                    Both mssgs.") plotopts(barw(.4) color(gs10)) ylab(0 (.1) .4, glcolor(gs12)) xlab(1 "Whites" 2 "Latinos" 3 "Whites" 4 "Latinos")  xsize(2.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("Trust, Study 2", color(black) size(medsmall)) col(1) graphregion (color(white)) xsize(2.5) ysize(4.5) 
*manually change scaling in each graph to 1.2, aspect in gaps bargraph to 0.6 (orientation North)



*Vote for cited pol (figure A6, right side)
reg cited_pos_wouldvote    i.PRIMEnegposorder##i.ethnicity  if (PRIME==3 |mixed_randomTWO==1)
eststo specvote_posS2
margins ethnicity, at (PRIMEnegposorder = (2 4 ) ) saving (file1, replace)
reg cited_neg_wouldvote    i.PRIMEnegposorder##i.ethnicity  if (PRIME==1 |mixed_randomTWO==0)
eststo specvote_negS2
margins ethnicity, at (PRIMEnegposorder = (1 3 ) ) saving (file2, replace)
combomarginsplot file1 file2,  recastci(rspike) ylabel(10(10) 80, glcolor(gs12)) title("")   ytitle ("Likelihood that you would vote for (%)", margin(right) size(medsmall)) xtitle ("Single mssg.                    Both mssgs.") xlab(1 "Anti-Lat." 2 "Pro-Lat." 3 "Anti-Lat." 4 "Pro-Lat.") note("N = 548", size(medsmall)) plot1opts(mcolor(blue) msymbol(O) lcolor(blue) lpattern(shortdash)) plot2opts(mcolor(maroon) msymbol(S) lcolor(maroon) lpattern(dash_dot)) ci1opts(lcolor(blue) )  ci2opts(lcolor(maroon) )   graphregion(color(white) margin(medlarge)) xsize(2.5) ysize(2.5) name (a, replace)

reg citedpolvote_unified i.posprime_listuse##i.PRIME_byethnicitysingle3
margins, dydx(posprime_listuse) at (PRIME_byethnicitysingle3 = (1 2 3 4))
marginsplot, recast(bar) recastci(rspike) ciopts(lpattern(shortdash) lcolor(gs4))  title("")  ytitle("Pro-/anti-Latino difference", margin(right)) xtitle("Single mssg.                    Both mssgs.") plotopts(barw(.4) color(gs10)) ylab(0 (10) 70, glcolor(gs12)) xlab(1 "Whites" 2 "Latinos" 3 "Whites" 4 "Latinos")  xsize(2.5) ysize(2)  graphregion(color(white) ) name(b, replace)

graph combine a b,title("Would vote for, Study 2", color(black) size(medsmall)) col(1) graphregion (color(white)) xsize(2.5) ysize(4.5) 
*manually change scaling in each graph to 1.2, aspect in gaps bargraph to 0.6 (orientation North)



***START HERE: 


*Table A14: Differences in trust in the cited politician by negative (vs. positive) message, testing for  moderation by ingroup identification level, Study 2. 


*difference of negprime - includes single-message and mixed-message respondents - with mixed message respondents' answers for either neg or pos randomly assigned for purposes of analysis (same grouping as used for Figures).  

/* Following code used to create interaction var for the randomized mixed-condition groups: 
gen inter_neglistuse_ID =  negprime_listuse * id_INGROUP

*/

est drop *

quietly eststo ptcited_whi_negid: reg citedpol_unified negprime_listuse id_INGROUP if ethnicity==0   
quietly eststo ptcited_whi_negidinter: reg citedpol_unified negprime_listuse id_INGROUP  inter_neglistuse_ID if ethnicity==0 
quietly eststo ptcited_whi_negidinterwc: reg citedpol_unified negprime_listuse id_INGROUP inter_neglistuse_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==0 

quietly eststo ptcited_lat_negid: reg citedpol_unified negprime_listuse id_INGROUP if ethnicity==1   
quietly eststo ptcited_lat_negidinter: reg citedpol_unified negprime_listuse id_INGROUP  inter_neglistuse_ID if ethnicity==1  
quietly eststo ptcited_lat_negidinterwc: reg citedpol_unified negprime_listuse id_INGROUP inter_neglistuse_ID   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if ethnicity==1 

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2)



*Table A15: Ethnic differences in trust in the cited politician, all respondents in a treatment condition, testing for inter-ethnic difference in moderation by ingroup identification level, Study 2. 

*Testing for ethnicity*identity interaction, citedpol trust as DV
*among both single and both-messages subjects
est drop *

quietly eststo ptcited_whi_negid: reg citedpol_neg_help01 white id_INGROUP  if PRIME ==1 | PRIME==2  
quietly eststo ptcited_white_negidinter: reg citedpol_neg_help01 white  id_INGROUP  inter_white_ID01 if PRIME ==1 | PRIME==2  
quietly eststo ptcited_whi_negidinterwc: reg citedpol_neg_help01 white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if PRIME ==1 |PRIME==2  

quietly eststo ptcited_whi_posid: reg citedpol_pos_help01 white id_INGROUP   if PRIME ==2 | PRIME==3  
quietly eststo ptcited_whi_posinter: reg citedpol_pos_help01 white id_INGROUP  inter_white_ID01  if PRIME ==2 | PRIME==3  
quietly eststo ptcited_whi_posidinterwc: reg citedpol_pos_help01 white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other     if PRIME ==2 | PRIME==3  

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2)



*Table A16: Differences in willingness to vote for the cited politician by negative (vs. positive) message, testing for  moderation by ingroup identification level, Study 2. 

*among single-direction subjects and mixed-condition (with mixed-conditionr respondents randomized to have either responses RE anti- or pro-Latino pol included in analysis)
est drop *

quietly eststo wvcited_whi_negid: reg citedpolvote_unified negprime_listuse id_INGROUP if ethnicity==0   
quietly eststo wvcited_whi_negidinter: reg citedpolvote_unified negprime_listuse id_INGROUP  inter_neglistuse_ID if ethnicity==0 
quietly eststo wvcited_whi_negidinterwc: reg citedpolvote_unified negprime_listuse id_INGROUP inter_neglistuse_ID  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  if ethnicity==0   

quietly eststo wvcited_lat_negid: reg citedpolvote_unified negprime_listuse id_INGROUP if ethnicity==1   
quietly eststo wvcited_lat_negidinter: reg citedpolvote_unified negprime_listuse id_INGROUP  inter_neglistuse_ID if ethnicity==1  
quietly eststo wvcited_lat_negidinterwc: reg citedpolvote_unified negprime_listuse id_INGROUP inter_neglistuse_ID   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other      if ethnicity==1 

esttab,  nogaps    cells(b(star fmt( %9.3f)) se(par fmt( %9.3f)))  stats(N r2)


*Table A17: Ethnic differences in (self-reported) likelihood of voting for the cited politician, including both responses about anti- and pro-Latino politician from respondents in mixed-message condition, testing for moderation by ingroup identification level, Study 2. 

*Testing for ethnicity*identity interaction
est drop *

quietly eststo wvcited_whi_negid: reg cited_neg_wouldvote white id_INGROUP  if PRIME ==1 | PRIME==2  
quietly eststo wvcited_white_negidinter: reg cited_neg_wouldvote white  id_INGROUP  inter_white_ID01 if PRIME ==1 | PRIME==2  
quietly eststo wvcited_whi_negidinterwc: reg cited_neg_wouldvote white id_INGROUP inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if PRIME ==1 |PRIME==2  

quietly eststo wvcited_whi_posid: reg cited_pos_wouldvote white id_INGROUP   if PRIME ==2 | PRIME==3  
quietly eststo wvcited_whi_posinter: reg cited_pos_wouldvote white id_INGROUP  inter_white_ID01  if PRIME ==2 | PRIME==3  
quietly eststo wvcited_whi_posidinterwc: reg cited_pos_wouldvote white id_INGROUP  inter_white_ID01 gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if PRIME ==2 | PRIME==3  

esttab,  nogaps    cells(b(star fmt( %9.2f)) se(par fmt( %9.2f)))  stats(N r2)




*Table A20: Effects of ingroup identification on trust in the cited politician, Study 2 - by message content, controlling for background factors, party affiliation and ideological factors.

*testing robustness of moderation effects of identification on specific trust & wouldvote-for - accounting for party affil., SDO, auth
*for spec trust
est drop *

quietly eststo pt_whi_negid: reg citedpol_neg_help01  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==1 |PRIME==2) & ethnicity==0
quietly eststo pt_whi_negidparty: reg citedpol_neg_help01  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==1 |PRIME==2) & ethnicity==0
quietly eststo pt_whi_negidsdoauth: reg citedpol_neg_help01  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  SDO_4index auth_2index  if (PRIME ==1 |PRIME==2)  & ethnicity==0

quietly eststo pt_whi_posid: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==2 | PRIME==3)  & ethnicity==0
quietly eststo pt_whi_posidparty: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==2 | PRIME==3)  & ethnicity==0
quietly eststo pt_whi_posidsdoauth: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index auth_2index  if (PRIME ==2 | PRIME==3)  & ethnicity==0


quietly eststo pt_lat_negid: reg citedpol_neg_help01  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==1 |PRIME==2) & ethnicity==1
quietly eststo pt_lat_negidparty: reg citedpol_neg_help01  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==1 |PRIME==2) & ethnicity==1
quietly eststo pt_lat_negidsdoauth: reg citedpol_neg_help01 id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  SDO_4index auth_2index  if (PRIME ==1 |PRIME==2)  & ethnicity==1
 
quietly eststo pt_lat_posid: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==2 | PRIME==3)  & ethnicity==1
quietly eststo pt_lat_posidparty: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==2 | PRIME==3)  & ethnicity==1
quietly eststo pt_lat_posidsdoauth: reg citedpol_pos_help01  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index auth_2index  if (PRIME ==2 | PRIME==3)  & ethnicity==1

esttab,  nogaps    cells(b(star fmt( %9.2f)) se(par fmt( %9.2f)))  stats(N r2)


*Table A21: Effects of ingroup identification on willingness to vote for the cited politician, Study 2 - by message content, controlling for background factors, party affiliation and ideological factors.

*and for voting
est drop *

quietly eststo wv_whi_negid: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==1 |PRIME==2) & ethnicity==0
quietly eststo wv_whi_negidparty: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==1 |PRIME==2) & ethnicity==0
quietly eststo wv_whi_negidsdoauth: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  SDO_4index auth_2index  if (PRIME ==1 |PRIME==2)  & ethnicity==0

quietly eststo wv_whi_posid: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==2 | PRIME==3)  & ethnicity==0
quietly eststo wv_whi_posidparty: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==2 | PRIME==3)  & ethnicity==0
quietly eststo wv_whi_posidsdoauth: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index auth_2index  if (PRIME ==2 | PRIME==3)  & ethnicity==0


quietly eststo wv_lat_negid: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==1 |PRIME==2) & ethnicity==1
quietly eststo wv_lat_negidparty: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==1 |PRIME==2) & ethnicity==1
quietly eststo wv_lat_negidsdoauth: reg cited_neg_wouldvote  id_INGROUP  gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other  SDO_4index auth_2index  if (PRIME ==1 |PRIME==2)  & ethnicity==1
 
quietly eststo wv_lat_posid: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus    if (PRIME ==2 | PRIME==3)  & ethnicity==1
quietly eststo wv_lat_posidparty: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other   if (PRIME ==2 | PRIME==3)  & ethnicity==1
quietly eststo wv_lat_posidsdoauth: reg cited_pos_wouldvote  id_INGROUP   gender educ_collegeplus age_25to34 age_35to44 age_45to54 age_55to64 age_65plus party_dem party_indep party_other SDO_4index auth_2index  if (PRIME ==2 | PRIME==3)  & ethnicity==1

esttab,  nogaps    cells(b(star fmt( %9.2f)) se(par fmt( %9.2f)))  stats(N r2)












